<%@ Page Title="Sys_StatusRecord Item" Language="C#" AutoEventWireup="true" CodeBehind="Sys_StatusRecordItem.aspx.cs" Inherits="Youz.CreditRepay.Manage.Sys_StatusRecordItem" %>
<script>
    

    var requireJS = [
        //"assets/js/jquery.form.js"
    ];
    loadJS(requireJS);
</script><div class="row"><div class="col-lg-12"><div class="panel panel-default"><div class="panel-heading"><h2><i class="fa fa-edit"></i><%: R(LanguageModule.Sys_StatusRecord, "Sys_StatusRecord", "Sys_StatusRecord") %></h2></div><div class="panel-body"><form id="frm" class="form-horizontal" method="post" enctype="multipart/form-data" action="Right/Handlers/Sys_StatusRecordHandler.ashx?type=save"><input id="RecordId" name="RecordId" type="hidden" />
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "MemberAccount", "会员帐号") %></label>
<div class="controls"><input type="text" id="MemberAccount" name="MemberAccount" maxlength="100" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "RecordTable", "记录表名(Member_Recharge,Member_Withdraw)") %></label>
<div class="controls"><input type="text" id="RecordTable" name="RecordTable" maxlength="100" class="form-control" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "RecordType", "记录类型 如(RechargeStatus/WithdrawStatus)") %></label>
<div class="controls"><input type="text" id="RecordType" name="RecordType" maxlength="50" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "BeforeValue", "记录变更之前的值") %></label>
<div class="controls"><input type="text" id="BeforeValue" name="BeforeValue" maxlength="4" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "AfterValue", "记录变更之后的值") %></label>
<div class="controls"><input type="text" id="AfterValue" name="AfterValue" maxlength="4" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "CreateTime", "记录变更时间") %></label>
<div class="controls"><input type="text" id="CreateTime" name="CreateTime" maxlength="8" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "Creator", "创建人") %></label>
<div class="controls"><input type="text" id="Creator" name="Creator" maxlength="200" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "Memo", "备注") %></label>
<div class="controls"><textarea id="Memo" name="Memo" rows="3" maxlength="1000" class="form-control"></textarea></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "ObjectID", "记录对象 如充值ID或提现ID") %></label>
<div class="controls"><input type="text" id="ObjectID" name="ObjectID" maxlength="100" class="form-control required" /></div>
</div>
<div class="form-group">
<label class="control-label" for="RoleDesc"><%: R(LanguageModule.Sys_StatusRecord, "LoginID", "登录ID") %></label>
<div class="controls"><input type="text" id="LoginID" name="LoginID" maxlength="16" class="form-control" /></div>
</div>
<div class="alert alert-danger" style="display: none;"><button type="button" class="close" data-dismiss="alert">×</button><strong>Oh snap!</strong><span class="content"></span></div><div class="form-actions"><button class="btn btn-success" type="submit" id="btnSubmit"><%: R(LanguageModule.M_Common, "btnSubmit", "保存修改") %></button>
						<button class="btn btn-default" type="button" id="btnCancel"><%: R(LanguageModule.M_Common, "btnCancel", "取消") %></button></div></form></div></div></div></div><script type="text/javascript">

    var flag = false;

    function validate() {
        return $("#frm").valid();
    };

    function get() {
        $.post("Sys/Handlers/Sys_StatusRecordHandler.ashx?type=get", { RecordId: "<%= WebHelper.Get("RecordId") %>" }, function (data) {
                $('#frm').fill(data);
            }, 'json');
        }

        $(function () {
            $("#frm").validate({
                errorElement: "span"
            });

            get();

            $("#frm").ajaxForm({
                dataType: 'json',
                beforeSubmit: function (arr, $form, options) {
                    if (flag) {
                        return false;
                    }
                    else {
                        flag = true;
                        return true;
                    }
                },
                success: function (data) {
                    if (data.isSuccess) {
                        loadPage("Sys/Sys_StatusRecordList.aspx");
                    }
                    else {
                        $(".alert > .content").html(data.message);
                        $(".alert").show();
                    }
                    flag = false;
                }
            });

            $("#btnCancel").click(function () {
                loadPage("Sys/Sys_StatusRecordList.aspx");				
            });
        });

</script>